import api from "@/request/api";
export default {
    state() {
        rolelists: []
    },
    mutations: {
        INITROLE(state: any, rolelists: any) {
            state.rolelists = rolelists
        }
    },
    actions: {
        getrolelist(context: any) {
            api.rolelist().then((res: any) => {
                if (res.code == 200) {
                    context.commit("INITROLE", res.list)
                }
            })
        }
    },
    getters: {},
    namespaced: true
}